<script setup lang="ts">
import { useLangStroe, pinia } from '@stores'
import {computed} from 'vue';
import { ElMessage } from 'element-plus'
import { useTheme } from '@hooks/useTheme'

const localeStore = useLangStroe(pinia)
const locale = computed(() => localeStore.getCurrentLang)

const { replaceTheme } = useTheme()
replaceTheme()
ElMessage({
  type: 'success',
  duration: 500000,
  message: 'Congrats, this is a success message.'
})
ElMessage({
  type: 'info',
  duration: 500000,
  message: 'Congrats, this is a success message.'
})
ElMessage({
  type: 'error',
  duration: 500000,
  message: 'Congrats, this is a success message.'
})
ElMessage({
  type: 'warning',
  duration: 500000,
  message: 'Congrats, this is a success message.'
})
</script>
<template>
  <el-config-provider :locale="locale.elLocale">
    <router-view />
  </el-config-provider>
</template>
